mod_rewrite + mod_headers :How to set Cache instructions for Rewritten .swf content only ?

mod_rewrite + mod_headers :How to set Cache instructions for Rewritten .swf content only ?

am 11.12.2009 02:53:43 von ABAPGUY

--0-546438894-1260496423=:53226
Content-Type: text/plain; charset=us-ascii

Hi Apache Experts,
I wish to set 2 Cache statements for .swf files (only) . I am rewriting using mod_rewrite and have enabled mod_headers .
My 1st attempt did not work :

RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
Header set Cache-Control "must-revalidate, proxy-revalidate"
Header set Pragma "public"
RewriteRule ^//(.*)\.swf https:////$1.swf [P,NC,L]

It seems RewriteCond is applied to the next Rewrite rule ..but the Headers are set for all subsequent Rewrite rules ..not what I wanted .
Is this the wrong way to do it ? How do I set the Headers for .swf files only ?

Regards
Daniel
--0-546438894-1260496423=:53226
Content-Type: text/html; charset=us-ascii

Hi Apache Experts,
I wish to set 2 Cache statements for .swf files (only) . I am rewriting using mod_rewrite and have enabled mod_headers .
My 1st attempt did not work  :

RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
Header set Cache-Control "must-revalidate, proxy-revalidate"
Header set Pragma "public"
RewriteRule ^/<flash_dir>/(.*)\.swf https://<servername>/<flash_dir>/$1.swf [P,NC,L]

It seems RewriteCond is applied to the next Rewrite rule ..but the Headers are set for all subsequent Rewrite rules ..not what I wanted .
Is this the wrong way to do it ? How do I set the Headers for .swf f
iles only ?

Regards
Daniel




--0-546438894-1260496423=:53226--

Re: mod_rewrite + mod_headers :How to set Cache

am 11.12.2009 03:25:08 von Igor Cicimov

--00504502c9fdf14388047a6aa123
Content-Type: text/plain; charset=ISO-8859-1


Header set Cache-Control "must-revalidate, proxy-revalidate"
Header set Pragma "public"


or use mod_headers commands per content (read the mod_headers instructions
on apache.org)



On Fri, Dec 11, 2009 at 12:53 PM, ABAPGUY wrote:

> Hi Apache Experts,
> I wish to set 2 Cache statements for .swf files (only) . I am rewriting
> using mod_rewrite and have enabled mod_headers .
> My 1st attempt did not work :
>
> RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
> Header set Cache-Control "must-revalidate, proxy-revalidate"
> Header set Pragma "public"
> RewriteRule ^//(.*)\.swf https:////$1.swf
> [P,NC,L]
>
> It seems RewriteCond is applied to the next Rewrite rule ..but the Headers
> are set for all subsequent Rewrite rules ..not what I wanted .
> Is this the wrong way to do it ? How do I set the Headers for .swf files
> only ?
>
> Regards
> Daniel
>
>

--00504502c9fdf14388047a6aa123
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<FilesMatch "\.(swf)$">
Header set Cache-Co=
ntrol "must-revalidate, proxy-revalidate"
Header set Pragma &q=
uot;public"
</FilesMatch>

or use mod_head=
ers commands per content (read the mod_headers instructions on ttp://apache.org">apache.org)




On Fri, Dec 11, 2009 at 12:53 PM, AB=
APGUY <abapguy@ya=
hoo.com
>
wrote:
"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padd=
ing-left: 1ex;">
;">
Hi Apache Experts,
I wish to set 2 Cache statements for .swf fil=
es (only) . I am rewriting using mod_rewrite and have enabled mod_headers .=


My 1st attempt did not work=A0 :

RewriteCond %{REQUEST_URI} \.(swf)$=
[NC]
Header set Cache-Control "must-revalidate, proxy-revalidate&q=
uot;
Header set Pragma "public"
RewriteRule ^/<flash_dir=
>/(.*)\.swf https://<servername>/<flash_dir>/$1.swf [P,NC,L]=



It seems RewriteCond is applied to the next Rewrite rule ..but the Head=
ers are set for all subsequent Rewrite rules ..not what I wanted .
Is th=
is the wrong way to do it ? How do I set the Headers for .swf files only ?<=
br>

Regards
Daniel






--00504502c9fdf14388047a6aa123--

RE: mod_rewrite + mod_headers :How to set Cacheinstructions for Rewritten .swf content only ?

am 30.12.2009 19:52:36 von Manoj Samtani

--_7fbadc1d-a440-4df0-b16d-dc92a904b9fa_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




You can use the following code to cache only .swf files:


Header set 604800 public must-revalidate



regards

Manoj
Date: Thu=2C 10 Dec 2009 17:53:43 -0800
From: abapguy@yahoo.com
To: users@httpd.apache.org
Subject: [users@httpd] mod_rewrite + mod_headers :How to set Cache instruct=
ions for Rewritten .swf content only ?



Hi Apache Experts=2C
I wish to set 2 Cache statements for .swf files (only) . I am rewriting usi=
ng mod_rewrite and have enabled mod_headers .
My 1st attempt did not work :

RewriteCond %{REQUEST_URI} \.(swf)$ [NC]
Header set Cache-Control "must-revalidate=2C proxy-revalidate"
Header set Pragma "public"
RewriteRule ^//(.*)\.swf https:////$1.swf=
[P=2CNC=2CL]

It seems RewriteCond is applied to the next Rewrite rule ..but the Headers =
are set for all subsequent Rewrite rules ..not what I wanted .
Is this the wrong way to do it ? How do I set the Headers for .swf files on=
ly ?

Regards
Daniel



=20
____________________________________________________________ _____
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop=

--_7fbadc1d-a440-4df0-b16d-dc92a904b9fa_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable








You can use the following code to cache only .swf files:

<=
=3BFilesMatch *.swf$>=3B
Header set 604800 public must-revalidate
&=
lt=3B/FilesMatch>=3B


regards

Manoj


lling">Date: Thu=2C 10 Dec 2009 17:53:43 -0800
From: abapguy@yahoo.com r>To: users@httpd.apache.org
Subject: [users@httpd] mod_rewrite + mod_he=
aders :How to set Cache instructions for Rewritten .swf content only ?
=



ize: 10pt=3B">
Hi Apache Experts=2C
I wish to set 2 Cache statements=
for .swf files (only) . I am rewriting using mod_rewrite and have enabled =
mod_headers .
My 1st attempt did not work =3B :

RewriteCond %=
{REQUEST_URI} \.(swf)$ [NC]
Header set Cache-Control "must-revalidate=2C=
proxy-revalidate"
Header set Pragma "public"
RewriteRule ^/<=3Bfla=
sh_dir>=3B/(.*)\.swf https://<=3Bservername>=3B/<=3Bflash_dir>=3B=
/$1.swf [P=2CNC=2CL]

It seems RewriteCond is applied to the next Rew=
rite rule ..but the Headers are set for all subsequent Rewrite rules ..not =
what I wanted .
Is this the wrong way to do it ? How do I set the Header=
s for .swf files only ?

Regards
Daniel





New Windows 7: Simplify what you do everyday.=
Find the rig=
ht PC for you.

=

--_7fbadc1d-a440-4df0-b16d-dc92a904b9fa_--